﻿package com.rbac.system.mapper;

import com.rbac.system.entity.Permission;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

@Mapper
public interface PermissionMapper {
    
    int insert(Permission permission);
    
    int updateById(Permission permission);
    
    int deleteById(Long id);
    
    Permission selectById(Long id);
    
    List<Permission> selectAll();
    
    List<Permission> selectByParentId(Long parentId);
    
    List<Permission> selectByStatus(Integer status);
    
    List<Permission> selectByType(String permissionType);
    
    List<Permission> selectByIds(@Param("ids") List<Long> ids);
    
    List<Permission> selectList(@Param("permission") Permission permission);
    
    Permission selectByCode(String permissionCode);
    
    long selectCount(@Param("permission") Permission permission);
} 

